package projecta_test;

import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.is;

import org.junit.Test;

import projecta.UserBean;
import projecta.UserDao;

public class UserDaoTest {

	@Test
	public void add() {
		
		UserDao dao = new UserDao();
		UserBean user = new UserBean();
		user.setId("Id_123");
		user.setName("Name_456");
		
		dao.addUser(user);
		
		UserBean user2 = dao.getUser("", user.getName());
		
		assertThat(user2.getName(), is(user.getName()));
	}
	
	

}
